<#assign pojo=oneToManyPojo.getOne()>
<#assign many=oneToManyPojo.getMany()>
<#assign ones=oneToManyPojo.getOnes()>
<#assign fields=pojo.getFilterdPojoFields()>
<#assign declarationName = pojo.importType(pojo.getDeclarationName())>
<#assign declarationNameFirstLetterLower = pojo.importType(pojo.getDeclarationNameFirstLetterLower())>
<#assign realPackageAndClassPath = "${pojo.getRealPackageAndClassPath()}">
<#assign masterid = pojo.getDeclarationNameFirstLetterLower()+"Id">
import React from "react";
import {Modal} from "antd";

import {find${declarationName}ByPage} from "../services/${declarationName}Service";
import BaseSelect from "../../components/ling/BaseSelect";
const confirm = Modal.confirm

export default class ${declarationName}Select extends React.Component {
  static propTypes = {
    visible: React.PropTypes.bool.isRequired,
    onOk: React.PropTypes.func,
    onCancel: React.PropTypes.func,
    queryData: React.PropTypes.func,
    columns: React.PropTypes.array,
  }
  static defaultProps = {
    queryData: find${declarationName}ByPage,
    columns: [
<#assign fields=pojo.getFilterdPojoFields()>
<#foreach field in fields>
    <#if field.getIsSampleField()>
      {
        title: '<#if field.getComment()?exists>${field.getComment()}<#else>${field.getName()}</#if>',
        dataIndex: '${field.getName()}',
        key: '${field.getName()}',
      },
    </#if>
</#foreach>
    ],
  }

  render() {
    return (
      <BaseSelect {...this.props}/>
    )
  }
}
